<div xmlns="http://www.w3.org/1999/xhtml"
  xmlns:ui="http://java.sun.com/jsf/facelets"
  xmlns:nxu="http://nuxeo.org/nxweb/util"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:f="http://java.sun.com/jsf/core"
  xmlns:c="http://java.sun.com/jstl/core"
  xmlns:a4j="http://richfaces.org/a4j">

  <ui:composition template="/incl/tabs/document_publish_template.xhtml">

    <ui:define name="document_publish_before_tree">
      <c:if test="#{not renditionDefinitions.isEmpty()}">
        <h:panelGrid styleClass="dataInput"
                     columnClasses="labelColumn, fieldColumn" columns="2">
          <h:panelGroup>
            <h:outputText value="#{messages['label.publish.rendition']}" />
          </h:panelGroup>
          <h:panelGroup>
            <h:selectOneMenu value="#{publishActions.publicationParameters['renditionName']}">
              <f:selectItem itemValue="" itemLabel="#{messages['label.rendition.none']}"/>
              <c:forEach var="renditionDefinition" items="#{currentDocumentVisibleRenditionDefinitions}">
                <f:selectItem itemValue="#{renditionDefinition.name}" itemLabel="#{messages[renditionDefinition.label]}"/>
              </c:forEach>
              <a4j:ajax event="change">
                <a4j:attachQueue ignoreDupResponses="true" />
              </a4j:ajax>
            </h:selectOneMenu>
          </h:panelGroup>
        </h:panelGrid>
      </c:if>
    </ui:define>

    <ui:define name="document_publish_after_tree">
    </ui:define>

  </ui:composition>

</div>
